// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-7-1

#ifndef __GAMEFILE_H_COMMON_NETMSG_
#define __GAMEFILE_H_COMMON_NETMSG_

#pragma once

#include <common\base\utility.h>

class CJoyGameInfo;
class CJoyLobbyInfo;
class CJoyLobbyGroupInfo;


//##ModelId=44C4B5FD00AC
typedef CMap<CString, const CString&, CJoyGameInfo*, CJoyGameInfo*&> CJoyGameMap;
//##ModelId=44C4B5FD00BB
typedef CMap<int, int, CJoyGameInfo*, CJoyGameInfo*&> CJoyGameTypeMap;
//##ModelId=44C4B5FD00BD
typedef CMap<CString, const CString&, CJoyLobbyInfo*, CJoyLobbyInfo*&> CJoyLobbyMap;
//##ModelId=44C4B5FD00CC
typedef CMap<int, int, CJoyLobbyInfo*, CJoyLobbyInfo*&> CJoyLobbyTypeMap;
//##ModelId=44C4B5FD00DA
typedef CMap<CString, const CString&, CJoyLobbyGroupInfo*, CJoyLobbyGroupInfo*&> CJoyLobbyGroupMap;

//##ModelId=44C4B5FD00DC
typedef CList<CJoyLobbyInfo>    CJoyLobbyList;
//##ModelId=44C4B5FD00EB
typedef CList<CJoyLobbyGroupInfo>   CJoyLobbyGroupList;
//##ModelId=44C4B5FD00FA
typedef CList<CJoyGameInfo>     CJoyGameList;

//##ModelId=44C4B5FD00FC
class CJoyGameInfo
{
public:
	//##ModelId=44C4B5FD0109
    int     m_id;
	//##ModelId=44C4B5FD010A
    CString m_name;
	//##ModelId=44C4B5FD010B
    CString m_icon;
	//##ModelId=44C4B5FD010C
    CString m_validExe;
};

//##ModelId=44C4B5FD0119
class CJoyLobbyInfo
{
public:
	//##ModelId=44C4B5FD011A
    int         m_id;
	//##ModelId=44C4B5FD0128
    CString     m_name;
	//##ModelId=44C4B5FD0129
    CString     m_title;
	//##ModelId=44C4B5FD012A
    CString     m_helpNote;

	//##ModelId=44C4B5FD0139
    CJoyGameInfo*   m_game;
	//##ModelId=44C4B5FD013E
    CJoyLobbyGroupInfo* m_group;
};

//##ModelId=44C4B5FD0148
class CJoyLobbyGroupInfo
{
public:
	//##ModelId=44C4B5FD0149
    CString     m_name;
	//##ModelId=44C4B5FD014A
    CString     m_title;

};


//##ModelId=44C4B5FD0157
class CJoyGameFile
{
public:
	//##ModelId=44C4B5FD0168
    CJoyGameMap         m_gameMap;
	//##ModelId=44C4B5FD016D
    CJoyGameTypeMap     m_gameTypeMap;
	//##ModelId=44C4B5FD0177
    CJoyLobbyMap        m_lobbyMap;
	//##ModelId=44C4B5FD017C
    CJoyLobbyTypeMap    m_lobbyIdMap;

	//##ModelId=44C4B5FD0181
    CJoyGameList        m_games;
	//##ModelId=44C4B5FD0189
    CJoyLobbyList       m_lobbies;
	//##ModelId=44C4B5FD018E
    CJoyLobbyGroupList  m_groups;
public:
	//##ModelId=44C4B5FD0198
    CJoyGameFile(void);
	//##ModelId=44C4B5FD019A
    virtual ~CJoyGameFile(void);

	//##ModelId=44C4B5FD01A5
    bool Load(PCSTR filePath);
};

#endif  // __GAMEFILE_H_COMMON_NETMSG_
